using WatiN.Core;

namespace YatFram.Browser.Watin
{
    public class WatinSelectBox : ISingleOption
    {
        private readonly SelectList selectList;

        public WatinSelectBox(SelectList selectList)
        {
            this.selectList = selectList;
        }

        public string SelectedValue
        {
            get { return selectList.SelectedOption.Value; }
        }


        public void Select(string value)
        {
            selectList.Option(Find.ByValue(value)).Select();
        }
    }
}